]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellDBus: Change AcceleratorActivated signature
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 12 Nov 2014 20:21:44 +0000 (21:21 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 19 Dec 2014 13:11:55 +0000 (14:11 +0100)
Adding new parameters to the signal currently will break keybindings
until gnome-settings-daemon is updated to the new API as well.
Put additional parameters into a dictionary instead to make future
extensions easier.

https://bugzilla.gnome.org/show_bug.cgi?id=711682

js/ui/shellDBus.js

index 45a2054cb187d40252558781756b69c756c34983..147b5f4e9754c19430053c791b4750abc8a3842a 100644 (file)
@@ -44,8 +44,7 @@ const GnomeShellIface = '<node> \
 </method> \
 <signal name="AcceleratorActivated"> \
     <arg name="action" type="u" /> \
-    <arg name="deviceid" type="u" /> \
-    <arg name="timestamp" type="u" /> \
+    <arg name="parameters" type="a{sv}" /> \
 </signal> \
 <property name="Mode" type="s" access="read" /> \
 <property name="OverviewActive" type="b" access="readwrite" /> \
@@ -196,11 +195,13 @@ const GnomeShell = new Lang.Class({
 
         let connection = this._dbusImpl.get_connection();
         let info = this._dbusImpl.get_info();
+        let params = { 'device-id': GLib.Variant.new('u', deviceid),
+                       'timestamp': GLib.Variant.new('u', timestamp) };
         connection.emit_signal(destination,
                                this._dbusImpl.get_object_path(),
                                info ? info.name : null,
                                'AcceleratorActivated',
-                               GLib.Variant.new('(uuu)', [action, deviceid, timestamp]));
+                               GLib.Variant.new('(ua{sv})', [action, params]));
     },
 
     _grabAcceleratorForSender: function(accelerator, flags, sender) {